package com.yuanhua.xcxmng.wechat.cons;

public enum TestTypeEnum {

    Blood_Sugar(0,"Blood_Sugar","血糖"),
    Uric_Acid(1,"Uric_Acid","尿酸"),
    Cholesterol(2,"Cholesterol","胆固醇"),
    Triglyceride(3,"Triglyceride","甘油三酯"),

    ;



    public static TestTypeEnum getEnumByCode(int code){
        for(TestTypeEnum e : TestTypeEnum.values()){
            if(e.getCode() == code){
                return e;
            }
        }
        return null;
    }

    public static TestTypeEnum getEnumByType(String type){
        for(TestTypeEnum e : TestTypeEnum.values()){
            if(e.getType().equals(type)){
                return e;
            }
        }
        return null;
    }

    private int code;

    private String type;

    private String desc;


    TestTypeEnum(int code, String type, String desc) {
        this.code = code;
        this.type = type;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }
}
